#!/usr/bin/env python

import pygtk
pygtk.require('2.0')
import gtk

class Window(gtk.Window):
    def __init__(self):
        gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)
        self.btn = gtk.Button("Hello")
        self.add(self.btn)
        self.btn.connect('clicked', self.hello)
        self.show_all()

    def hello(self, b):
        print "Hello, world!"

    def main(self):
        gtk.main()

if __name__ == '__main__':
    w = Window()
    w.main()
